<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no,minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>异常详情</title>
    <link href="Tools/MoCoop/MoCoop.css" rel="stylesheet">
    <!--MoCoop CSS-->
    <link href="css/style.css" rel="stylesheet">
    <!--自定义样式-->
    <link href="Tools/PTR/ptr.css" rel="stylesheet">
</head>
<body>
<div class="mc-container">
    <div class="mc-commonpage mc-simplepage">
        <div class="mc-body">
            <div id="ptr">
                <span class="icon-ptr"></span>

                <div class="loading">
                    <span id="l1"></span>
                    <span id="l2"></span>
                    <span id="l3"></span>
                </div>
            </div>
            <div id="content" class="mc-fullpage pagebg-grey">
                <div class="abnormal-item">
                    <div id="CONTAINER-abnormal-detail"></div>
                    <div class="remark-reply" style="width: 95%;margin-top: 0px;" id="CONTAINER-abnormalRemark"></div>
                    <!--<div class="abnormal-itemcontainer" >
                        <div class="abnormal-itemheader">
                            <div class="order-name">厦建轻14-1781COR-2JY</div>
                            <div class="order-info">ZNZTOTIV16-203</div>

                            <div class="header-topright-btn text-right mc-responseicon textcolor-main disabled" onclick="mc.jump('submit.html?submitType=2','编辑异常','SubmitModal')">编辑</div>
                        </div>
                        <div class="abnormal-itemstatus">异常状态：<span class="textcolor-success">新建</span>
                            &lt;!&ndash;<div class="abnormal-itemextrabtn mc-btn restart">重启</div>&ndash;&gt;
                            <div class="abnormal-itemextrabtn mc-btn finish disabled">完成</div>
                        </div>
                        <div class="abnormal-itemcontent"></div>

                        <div class="abnormal-itemfooter">
                            <div class="item-person">操作人：陈超文</div>
                            <div class="item-date text-right">时间：2015-05-12 11:00</div>
                        </div>
                    </div>-->
                </div>
                <script id="TEMPLATE-abnormal-detail" type="text/ractive">
                    {{#ractiveData:i}}
                    <div class="abnormal-itemcontainer" id="{{jsonPK?jsonPK:'abnormalCreate'+getAjaxID(createStatus)}}">
                        <div class="ajax-status textcolor-main">
                            {{#if (getAjaxStatus(descriptionStatus) == 'uploading' || getAjaxStatus(attachmentStatus) == 'uploading' || getAjaxStatus(abnormalStatusStatus) == 'uploading') }}
                                上传中
                            {{/if}}
                        </div>
                        {{#if (getAjaxStatus(descriptionStatus) == 'failed' || getAjaxStatus(attachmentStatus) == 'failed' || getAjaxStatus(abnormalStatusStatus) == 'failed') }}
                            <div class="ajax-status textcolor-danger mc-responseicon" onclick="util.findThisAbnormalFailedTask(this,'{{jsonPK}}')">上传失败<br>点击重试</div>
                        {{/if}}
                        <div class="abnormal-itemheader {{orderAttachment != null ? 'headerwithimage':''}}">
                            <div class="header-image">
                                {{#orderAttachment}}
                                    <img id="{{setName(orderAttachment)}}_{{i}}"/>
                                {{/orderAttachment}}
                            </div>
                            <div class="order-name">{{orderNo}}</div>
                            <div class="order-info">{{itemNo}}</div>
                        {{#if getAjaxStatus(descriptionStatus) != 'uploading' && getAjaxStatus(attachmentStatus) != 'uploading' && getAjaxStatus(abnormalStatusStatus) != 'uploading' && getAjaxStatus(descriptionStatus) != 'failed' && getAjaxStatus(attachmentStatus) != 'failed' && getAjaxStatus(abnormalStatusStatus) != 'failed' && status != '已完成'}}
                            <div class="header-topright-btn text-right mc-responseicon textcolor-main padding-right40" onclick="util.editAbnormalDetail()">编辑</div>
                            <div class="header-topright-btn text-right mc-responseicon textcolor-main" onclick="util.replyRemark()">回复</div>
                        {{/if}}
                        </div>
                        流程名：<span class="textcolor-process">{{processName}}</span>
                        <div class="abnormal-itemstatus">异常状态：<span class="textcolor-success">{{status}}</span>
                        {{#if getAjaxStatus(descriptionStatus) != 'uploading' && getAjaxStatus(attachmentStatus) != 'uploading' && getAjaxStatus(descriptionStatus) != 'failed' && getAjaxStatus(attachmentStatus) != 'failed' && getAjaxStatus(abnormalStatusStatus) != 'failed'}}
                            {{#if (status)=='已完成'}}
                                <div class="abnormal-itemextrabtn mc-btn restart" onclick="util.changeAbnormalDetailStatus('1')">重启</div>
                            {{/if}}
                            {{#if (status)=='进行中' }}
                                <div class="abnormal-itemextrabtn mc-btn finish" onclick="util.changeAbnormalDetailStatus('0')">完成</div>
                            {{/if}}
                        {{/if}}
                        </div>
                        <div class="abnormal-itemcontent">{{description}}</div>
                        <div class="abnormal-itemfooter">
                            <div class="item-person">提交人：{{lastModifiedByUserLogin?lastModifiedByUserLogin:createdByUserLogin}}</div>
                            <div class="item-date text-right">时间：{{formatDate(lastUpdateTime ? lastUpdateTime : createdTime,"yyyy-MM-dd hh:mm")}}</div>
                        </div>
                        {{#if ((attachment ? attachment : attachment) != "null" && (attachment ? attachment : attachment) != undefined && (attachment ? attachment : attachment) != [] && (attachment ? attachment : attachment) != "[]")}}
                            <!--<div class="section-header">
                                示意图
                            </div>-->
                            <div class="photos-container" value="{{this.attachment ? this.attachment : this.attachment}}">
                                {{#JSON.parse(attachment ? attachment : attachment):i}}
                                    <div class="photo-item" onclick="util.showDetailPhotosByIndex(this,{{i}})">
                                        <img id="{{setName(this)}}">
                                        <div class="imgprogress"></div>
                                    </div>
                                {{/JSON.parse(attachment ? attachment : attachment)}}
                                <div class="clearboth"></div>
                            </div>
                        {{/if}}
                    </div>
                    {{/ractiveData}}
                </script>
                <!--<div class="list-title">异常备注：</div>
                <div class="remark-list" id="CONTAINER-abnormalRemark">

                </div>-->
                <script id="TEMPLATE-abnormalRemark" type="text/ractive">
                    <em></em>
                    {{#ractiveData}}
                        {{#if toUserID && toUserID != "null" && abnormalStatus == "进行中"}}
                        <div class="reply-itemcontent"><span class="textcolor-process">{{createdByUserLogin}}</span> 回复 <span class="textcolor-process">{{toUserName}}</span>：{{description ? description : description}}</div>
                        {{else}}
                        <div class="reply-itemcontent"><span class="textcolor-process">{{createdByUserLogin}}</span>：{{description ? description : description}}</div>
                        {{/if}}
                        {{#if attachment != "[]"}}
                            <div class="photos-container" value="{{this.attachment ? this.attachment : this.attachment}}">
                                {{#JSON.parse(this.attachment ? this.attachment : this.attachment):i}}
                                    <div class="photo-item" onclick="util.showReplyRemarkPhotosByIndex(this,{{i}})">
                                        <img id="{{setName(this)}}">
                                        <div class="imgprogress"></div>
                                    </div>
                                {{/JSON.parse(attachment ? attachment : attachment)}}
                                <div class="clearboth"></div>
                            </div>
                        {{/if}}
                        <div class="remark-itemfooter" style="margin-bottom:10px">
                            <div class="item-date text-center">{{formatDate(lastUpdateTime,"yyyy-MM-dd hh:mm")}}</div>
                            {{#if abnormalStatus == "进行中"}}
                                <div class="header-floatright-btn text-right mc-responseicon textcolor-main" onclick="util.replyRemark('{{createdByUserID}}','{{createdByUserLogin}}')">回复</div>
                            {{/if}}
                        </div>
                    {{/ractiveData}}
                </script>
                <!--<script id="TEMPLATE-abnormalRemark" type="text/ractive">
                    {{#ractiveData}}
                        <div class="remark-item" id="{{jsonPK?jsonPK:'remarkCreate'+getAjaxID(createStatus)}}">
                                {{#if (getAjaxStatus(descriptionStatus) == 'uploading' || getAjaxStatus(attachmentStatus) == 'uploading' || getAjaxStatus(createStatus) == 'uploading') }}
                                    <div class="ajax-status textcolor-main">上传中</div>
                                {{/if}}
                                {{#if (getAjaxStatus(descriptionStatus) == 'failed' || getAjaxStatus(attachmentStatus) == 'failed' || getAjaxStatus(createStatus) == 'failed') }}
                                    <div class="ajax-status textcolor-danger mc-responseicon" onclick="util.findThisAbnormalFailedTask(this,'{{jsonPK}}')">上传失败<br>点击重试</div>
                                {{/if}}
                            <div class="remark-itemheader">
                                备注
                                {{#if (getAjaxStatus(descriptionStatus) != 'failed' && getAjaxStatus(attachmentStatus) != 'failed' && getAjaxStatus(createStatus) != 'failed' && getAjaxStatus(descriptionStatus) != 'uploading' && getAjaxStatus(attachmentStatus) != 'uploading')}}
                                    <div class="header-floatright-btn text-right mc-responseicon textcolor-main" onclick="mc.jump('submit.html?submitType=8&type=3&pID={{jsonPK}}&objID='+vars.abnormalID+'&processName=' + vars.processName, '新增备注回复', 'SubmitModal')">回复</div>
                                    <div class="header-floatright-btn text-right mc-responseicon textcolor-main" onclick="util.editAbnormalRemark('{{jsonPK?jsonPK:localPK}}')">编辑</div>
                                {{/if}}
                            </div>
                            <div class="remark-itemcontent">{{description ? description : description}}</div>
                                <div class="photos-container" value="{{this.attachment ? this.attachment : this.attachment}}">
                                    {{#JSON.parse(this.attachment ? this.attachment : this.attachment):i}}
                                        <div class="photo-item" onclick="util.showRemarkPhotosByIndex(this,{{i}})">
                                            <img id="{{setName(thumbnailFileKey)}}">
                                            <div class="imgprogress"></div>
                                        </div>
                                    {{/JSON.parse(attachment ? attachment : attachment)}}
                                    <div class="clearboth"></div>
                                </div>
                            <div class="remark-itemfooter">
                                <div class="item-person">操作人：{{lastModifiedByUserLogin?lastModifiedByUserLogin:createdByUserLogin}}</div>
                                <div class="item-date text-right">时间：{{formatDate(lastUpdateTime,"yyyy-MM-dd hh:mm")}}</div>
                            </div>
                            {{#if replyList}}
                                <div class="remark-reply">
                                    <em></em>
                                    {{#replyList}}
                                        {{#if fromUserName }}
                                            <div class="reply-itemcontent"><span class="textcolor-process">{{fromUserName}}</span> 回复 <span class="textcolor-process">{{toUserName}}</span>：{{description ? description : description}}</div>
                                        {{else}}
                                            <div class="reply-itemcontent"><span class="textcolor-process">{{createdByUserLogin}}</span>：{{description ? description : description}}</div>
                                        {{/if}}
                                        {{#if attachment != "[]"}}
                                        <div class="photos-container" value="{{this.attachment ? this.attachment : this.attachment}}">
                                            {{#JSON.parse(this.attachment ? this.attachment : this.attachment):i}}
                                                <div class="photo-item" onclick="util.showReplyRemarkPhotosByIndex(this,{{i}})">
                                                    <img id="{{setName(thumbnailFileKey)}}">
                                                    <div class="imgprogress"></div>
                                                </div>
                                            {{/JSON.parse(attachment ? attachment : attachment)}}
                                            <div class="clearboth"></div>
                                        </div>
                                        {{/if}}
                                        <div class="remark-itemfooter" style="margin-bottom:10px">
                                            <div class="item-date text-center">{{formatDate(lastUpdateTime,"yyyy-MM-dd hh:mm")}}</div>
                                        <div class="header-floatright-btn text-right mc-responseicon textcolor-main" onclick="util.replyRemark('{{pID}}','{{lastModifiedByUserLogin?lastModifiedByUserLogin:createdByUserLogin}}')">回复</div>
                                        </div>
                                    {{/replyList}}
                                </div>
                            {{/if}}

                        </div>
                    {{/ractiveData}}
                </script>-->
            </div>
            <!--<div id="btn-addabnormalremark" class="btn-bottom mc-btn" onclick="util.addAbnormalRemark()">
                添加备注
            </div>-->
        </div>
    </div>
</div>
<script src="Tools/jquery-2.1.4.min.js"></script>
<!--jquery-->
<script src="Tools/Ractive.js"></script>
<script src="Tools/PTR/hammer.2.0.4.js"></script>
<script src="js/common.js"></script>
<script src="Tools/PTR/wptr.1.1.js"></script>
<!--公共方法JS（由用户编写）-->
<script src="js/pages/abnormal-detail.js"></script>
<!--当前页面JS（由用户编写）-->
<script src='js/dataInterface.js'></script>
<!--获取数据方法JS（由用户编写）-->
<script src="Tools/MoCoop/MoCoop.js"></script>
<!--MoCoopJS（必须引入）-->
</body>
</html>
                    